
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 1
 * @Author : WangRuoyu 
 * @Date : 2023/5/15 9:32
 */

#include "iostream"
#include "algorithm"

using namespace std;

int main() {
    int n;
    cin >> n;
    n /= 10;
    int res = 0;
    while (n > 0) {
        if (n >= 5) {
            n -= 5;
            res += 7;
        } else if (n >= 3) {
            n -= 3;
            res += 4;
        } else {
            res += n;
            n = 0;
        }
    }
    cout << res;
    return 0;
}